package core;

import java.util.Collection;
import org.json.JSONObject;

public enum DevelopmentCardType {
	
	KNIGHT, MONOPOLY, ROAD_BUILDING, YEAR_OF_PLENTY;
	
	public static String toString(DevelopmentCardType type) {
		if(type == KNIGHT) {
			return "KNIGHT";
		}
		else if(type == MONOPOLY) {
			return "MONOPOLY";
		}
		else if(type == ROAD_BUILDING) {
			return "ROAD_BUILDING";
		}
		else {
			return "YEAR_OF_PLENTY";
		}
	}
	public static DevelopmentCardType fromString(String s) {
		if(s.equals("KNIGHT")) {
			return KNIGHT;
		}
		else if(s.equals("MONOPOLY")) {
			return MONOPOLY;
		}
		else if(s.equals("ROAD_BUILDING")) {
			return ROAD_BUILDING;
		}
		else {
			return YEAR_OF_PLENTY;
		}
	}
}
